import { Field, ObjectType } from "@nestjs/graphql";
import { BaseEntity } from "../base.entity/base.entity";
import { College } from "@prisma/client";
import { DepartmentEntity } from "../department.entity/department.entity";

@ObjectType()
export class CollegeEntity extends BaseEntity implements College {
    @Field()
    name: string;

    @Field(() => [DepartmentEntity], { nullable: true })
    Department?: DepartmentEntity[]
}
